package hz.mobileproject.pda.ui.adapter;

import android.graphics.Color;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

import java.util.List;

import hz.mobileproject.pda.R;
import hz.mobileproject.pda.entity.AdmonishLeiXingBean;
import hz.mobileproject.pda.ui.activity.work.AdmonishActivity;
import hz.mobileproject.pda.ui.base.BaseCustomAdapter;

/**
 * Created by Lc on 2017/12/19.
 */

public class AdmonishPopAdapter extends BaseCustomAdapter<AdmonishLeiXingBean, AdmonishPopAdapter.ViewHolder> {


    public AdmonishPopAdapter(AdmonishActivity mContext, List<AdmonishLeiXingBean> eduTypes) {
        super(mContext, eduTypes);
    }


    @Override
    protected int bindView() {
        return R.layout.item_pop_inlv;
    }

    @Override
    protected ViewHolder createViewHolder() {
        return new ViewHolder();
    }

    @Override
    protected void bindData(int position, View convertView, ViewHolder viewHolder) {
        viewHolder.textView.setText(mList.get(position).value);
        viewHolder.textView.setTextColor(ContextCompat.getColor(mContext, R.color.custom_blue_card));
        viewHolder.textView.setTextSize(16);
        convertView.setBackgroundColor(Color.parseColor("#f2f2f2"));
    }

    class ViewHolder {
        @ViewInject(R.id.text1)
        private TextView textView;
    }
}
